package org.example.ui;

import org.apache.ibatis.session.SqlSession;
import org.example.entity.Student;
import org.example.mapper.StudentMapper;
import org.example.util.MyBatisUtil;

import java.util.List;

public class SearchStudents {
    public static void main(String[] args) {
        SqlSession sqlSession= MyBatisUtil.getSession();
        StudentMapper studentMapper=sqlSession.getMapper(StudentMapper.class);
        List<Student> students= studentMapper.getAllStudents();
        for(Student student:students){
            System.out.println(student.toString());
        }
    }
}
